# Testing and Debugging Workflows
The Workflow Designer offers controls from the menu bar to run workflows directly from the designer, along with options to debug and troubleshoot.
The first method is to “Deploy and Play” which will deploy the current diagram as a new workflow deployment and then run it. The diagram will display in a new window.
All the options for the diagram are available. See “Workflow Execution Diagrams” for more information.
The next option provides a convenience feature to quickly bring back the last ran workflow instance. This is determined per user, and will not load other user’s workflow instances.
The last option, “Play, Advanced” provides for more options to debug the workflow.
Note: “Play, Advanced” will not deploy the current diagram prior to execution. If the current diagram is to be used, it must be deployed prior, separately.
“Play, Advanced” will will display a dialog with options to control the execution of the workflow.
Options are below.
Mode
“Test” is like normal execution and will run the workflow to its completion in the selected Execution mode.
“Debug” provides additional options for execution.
“Debug Log All Actions” will run each action with the highest level debugging mode, writing to the application log.
“Break On All Actions” will run each workflow “Stepping” and pause, allowing for viewing of the workflow activities before running the workflow to completion. When run with this option, the diagram provides a “Step” control which will continue the workflow to its next step.
When running in “Test” mode, these additional options are available.
Execution
“Run in Web Server” – Runs the workflow in memory, “In Process” from the Web Server process
“Run in Workflow Engine – Not Logged” – Runs the workflow in process from the workflow engine process
“Run in Workflow Engine – Logged” – Runs the workflow persisted to the database from the workflow engine process
Run As User
System – Runs the workflow as the system identity
Authenticated User – Runs the workflow as the current web application user
Fixed User – Runs the workflow with the user identity specified
Output Type
Variable – The workflow is going to return all its variables, structured in a JSON document
String Variable Raw – Indicates the selected variable will be returned as a simple string
String – Requires the running workflow to use the “Set String Output” action which returns a raw string
Table – The workflow will return a Data Table. The displayed results will be shown in JSON format. The workflow must use one of the Table Output actions to return data
File – The workflow will return a file variable output. The Test Result will be displayed as JSON
Test Input – Input values may be specified for the variables defined for the workflow
The “Test” button will start the workflow with the selected options and the checkbox “Open Details” indicates the workflow diagram should be immediately loaded on launch.
The Test Result section displays the output from the workflow and provides a link to “View Detail” which will load the diagram for the workflow.